// goods/details/details.js
Page({
  data: {},
  onLoad() {
    // 当前形成的页面历史记录
    const currentPages = getCurrentPages()
    // currentPage 就是当前页面实例，等价于 this
    const currentPage = currentPages[currentPages.length - 1]
    // console.log(currentPage === this)
    currentPage.sayHi()
    // this.sayHi()
  },
  sayHi() {
    console.log('Hello')
  }
})